package cn.tedu.qxhouserent.house.mapper;

import cn.tedu.qxhouserent.commons.security.LoginPrincipal;
import cn.tedu.qxhouserent.house.pojo.entity.Feedback;
import cn.tedu.qxhouserent.house.pojo.entity.UserHouseAppoint;
import cn.tedu.qxhouserent.house.pojo.entity.UserHouseCollection;
import cn.tedu.qxhouserent.house.pojo.vo.UserHouseAppointVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.security.core.parameters.P;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;

@Repository
public interface UserHouseAppointMapper extends BaseMapper<UserHouseAppoint> {

    int insertBatch(UserHouseAppoint[] userHouseAppoints);

    List<Long> getUserHouseAppointIds(Long id);

    int countD(@Param("dateTime") String dateTime,@Param("jid") Long jid);

    @Select("select agent_id from house where id = #{houseId}")
    Long jid(Long houseId);

    int insertApp(@Param("uid") Long id, @Param("hid") Long houseId, @Param("name") String name, @Param("phone") String phone,@Param("d") String dateTime);

    List<UserHouseAppointVO> yuecha(@Param("id") Long id, @Param("d") String d);
}
